/* 
 * Modbus app for RTU.
 * Copyright (c) 2012  apleilx
 * All rights reserved.
 * no limite
 */

/* ----------------------- Platform includes --------------------------------*/
#include "mbapp.h"
#include "osObjects.h"                                          // RTOS object definitions
#include "mbdatacfg.h"

	osEvent EventInfo;
	uint8_t mbCmdCnt;


/*****************************************************************************//*!
* @brief   	Slave device handle.
*               
* @param   none
*
* @return  none
*
* @ Pass/ Fail criteria: none
*****************************************************************************/    
void Modbus (void const *argument)
{
	
	mbInit( RTU_SLAVE, MB_BAUD_19200 , MB_PAR_NONE);
	
    mbCmdCnt = 255;
	while(mbCmdCnt--)
		RegHolding[mbCmdCnt] = mbCmdCnt+1;
	
    for(;;)
	{
	
			osDelay(2000);
			
		
		
    }
}

/*****************************************************************************//*!
* @brief   	Slave device handle.
*               
* @param   none
*
* @return  none
*
* @ Pass/ Fail criteria: none
*****************************************************************************/
void mbSlavePoll()
{
  
}


/*----------------------------------------------------------------------------*/

/*****************************************************************************//*!
* @brief   Master device handle.
*               
* @param   none
*
* @return  none
*
* @ Pass/ Fail criteria: none
*****************************************************************************/
void mbMasterPoll()
{
  

}


